#include <iostream>

class Base
{
public:
    Base()
    {
        m_A = 100;
    }
    int m_A;
    void func()
    {
        std::cout << "Base::func()" << std::endl;
    }
};

class Son : public Base
{
public:
    Son()
    {
        m_A = 200;
    }
    int m_A;
    void func()
    {
        std::cout << "Son::func()" << std::endl;
    }
};

void test01()
{
    Son s;
    std::cout << s.m_A << std::endl;
    // 访问父类中的同名成员加作用域
    std::cout << s.Base::m_A << std::endl;
}

void test02()
{
    Son s;
    s.func();
    // 访问父类中的同名成员加作用域
    s.Base::func();
}

int main()
{
    test01();
    test02();
    return 0;
}